package com.example.demo.controller;

import com.example.demo.service.UsersService;
import com.example.demo.vo.ResponseVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UsersController {
    @Autowired
    private UsersService usersService;
    @GetMapping("/list")
    public ResponseVO list() {
        return ResponseVO.success("查询成功", usersService.listAll());
    }
}
